package com.qf.business.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.data.system.dto.PowerDto;
import com.qf.data.system.entity.Power;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (Power)表数据库访问层
 *
 * @author makejava
 * @since 2022-05-26 16:16:52
 */
public interface PowerMapper extends BaseMapper<Power> {

    /**
     * 会连带的查询出当前权限的父权限名称
     * @return
     */
    @Select("select *,(select power_name from power where id = p.pid) as parentName from power p")
    List<PowerDto> queryList();
}


